{% extends "registration/base_site.html" %}
{% load i18n %}

{% block bodyclass %}login{% endblock %}

{% block nav-global %}{% endblock %}

{% block content_title %}{% endblock %}

{% block breadcrumbs %}{% endblock %}

{% block content %}
{% if form.errors and not form.non_field_errors and not form.this_is_the_login_form.errors %}
<p class="errornote">
{% blocktrans count form.errors.items|length as counter %}{% plural %}Please correct the errors below.{% endblocktrans %}
</p>
{% endif %}

{% if form.non_field_errors or form.this_is_the_login_form.errors %}
{% for error in form.non_field_errors|add:form.this_is_the_login_form.errors %}
<p class="errornote">
    {{ error }}
</p>
{% endfor %}
{% endif %}

<div id="content-main">
<form action="{{ app_path }}" method="post" id="login-form">{% csrf_token %}
<div id="LogonControl">
				<table width="100%" cellspacing="0" cellpadding="0" border="0" class="logon-table">
                    <tbody>
					<tr style="height: 20px; background-color: #F0F0F0;" id="FailureRow">
						<td style="padding: 0 20px" colspan="3">   
                        </td>
					</tr>
                    <tr style="background-color: #F0F0F0; height: 35px;">
                        <td class="label-cell">
                 
                        </td>
                        <td>
                            {% if not form.this_is_the_login_form.errors %}{{ form.username.errors }}{% endif %}
    <label for="id_username" class="required">{% trans 'Username:' %}</label> {{ form.username }}
                        </td>
                        <td class="validator-cell">
                            <span style="color:Red;display:none;" title="User name is required field." id="UserNameRfv">
                                 <span class="icon status-yellow"></span>
                            </span>
                        </td>
                    </tr>
                    <tr style="background-color: #F0F0F0; height: 35px;">
                        <td class="label-cell">
                     
                        </td>
                        <td>
                            {% if not form.this_is_the_login_form.errors %}{{ form.password.errors }}{% endif %}
    <label for="id_password" class="required">{% trans 'Password:' %}</label> {{ form.password }}
    <input type="hidden" name="this_is_the_login_form" value="1" />
    <input type="hidden" name="next" value="{{ next }}" />
                        </td>
                        <td class="validator-cell">
                            <span style="color:Red;display:none;" title="Password is required field." id="PasswordRfv">
                                 <span class="icon status-yellow"></span>
                            </span>
                        </td>
                    </tr>
                    <tr class="bottom-row" style="background-color: #F0F0F0">
                        <td colspan="3">
                            <input type="submit" value="{% trans 'Log in' %}" />
    <input type="hidden" name="next" value="/../tester/ping/" />
                        </td>
                    </tr>
                </tbody></table>
                </tbody></table>
  </div>
</form>

<script type="text/javascript">
document.getElementById('id_username').focus()
</script>
</div>
{% endblock %}
